package com.bym.mall.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author bym
 * @since 2022-03-14
 */
@TableName("mall_category")
@ApiModel(value = "Category对象", description = "")
@Data
public class CategoryVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("类别Id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("父类别id当id=0时说明是根节点,一级类别")
    private Integer parentId;

    @ApiModelProperty("类别名称")
    private String name;

    @ApiModelProperty("排序编号,同类展示顺序,数值相等则自然排序")
    private Integer sortOrder;

    @ApiModelProperty("该目录的子目录")
    private List<CategoryVo> subCategories;
}
